package com.itheima01.service;

import com.itheima01.dao.StudentDao;
import com.itheima01.domian.Student;

import java.util.List;

public class StudentService implements StudentServiceIf{
    private StudentDao studentDao=new StudentDao();

    //重写接口查询所有
    @Override
    public List<Student> finAll() {
        return studentDao.findAll();
    }
    //根据id查找
    @Override
    public Student finId(Integer id) {
        return studentDao.findId(id);
    }

    @Override
    public int addStudent(Student student) {
        return studentDao.addStudent(student);
    }
}
